﻿@model RazzzorTest.Models.Page
@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.wysiwyg.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <div class="editor-label">
        <p>
            Wpisz treśc jaka będzie wyświetlana na stronie głównej
        </p>
    </div>
    <div class="editor-field">
        <textarea id="contentTextArea" name="Content" rows="60" cols='60'>
        @ViewBag.Content 
        </textarea>
        @Html.ValidationMessageFor(model => model.Content)
    </div>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#contentTextArea').wysiwyg();
        });
    </script>
    <p>
        <input type="submit" value="Zapisz" />
    </p>
}
<div>
    @Html.ActionLink("Powrót", "Index")
</div>
